import time

print("""1. """)
print([i * i for i in range(10)])
print([index * value for index, value in enumerate(range(1, 11))])

print("""2.""")
a = [1, 3, 5, 7, 9]
b = [2, 4, 6, 8, 10]
print(list(zip(a, b)))

print("""3.""")
import re

_str = "2020年9月10日"
_result = re.match(r'\d{4}年\d{1,2}月\d{2}日', _str)
print(_result)

print("""4.""")
stu = [('a', 1), ('b', 3), ('c', 2)]
print(sorted(stu, key=lambda item: item[1], reverse=True))

print("""5.""")


def eval_prefix(strs):
    min_len = min([len(s) for s in strs])
    result = ""
    for i in range(1, min_len+1):
        sub_str_list = [s[:i] for s in strs]
        common_set = set(sub_str_list)
        if len(common_set) != 1:
            return result
        else:
            result = common_set.pop()
    return result


print(eval_prefix(['abcddsgsds', 'abcdehththr', 'abcrrrr']))
print(eval_prefix(['abc', 'def', 'ghi']))

print("""6.""")


def timer(func):
    def inner(*args, **kwargs):
        start_time = time.time()
        result = func(*args, **kwargs)
        print(time.time() - start_time)
        return result

    return inner


print("""7.""")

print("""8.""")
print("""9.""")
print("""10.""")
